import Layout from '@/layouts/index.vue'

import ListIcon from '@/assets/test-img/icon_menu_shuju.svg'
import FormIcon from '@/assets/test-img/icon_menu_cheliang.svg'
import GrzxIcon from '@/assets/test-img/icon_menu_grzx.svg'
import HomeIcon from '@/assets/test-img/icon_menu_diaodu.svg'
import ModelIcon from '@/assets/test-img/icon_menu_zj.svg'
import DetailIcon from '@/assets/test-img/icon_xq.svg'
import DashboardIcon from '@/assets/test-img/icon_menu_zhuye.svg'

export default [
  {
    path: '/defaults',
    name: 'defaults',
    component: Layout,
    redirect: '/defaults/serviceError',
    meta: {
      title: '缺省页',
      icon: HomeIcon
    },
    children: [
      {
        path: 'serviceError',
        name: 'serviceErrorPage',
        component: () => import('@/pages/default/serviceError.vue'),
        meta: {
          title: '服务器出错页',
          icon: ModelIcon
        }
      },
      {
        path: 'netWorkAnomaly',
        name: 'netWorkAnomalyPage',
        component: () => import('@/pages/default/netWorkAnomaly.vue'),
        meta: {
          title: '网络异常页',
          icon: GrzxIcon
        }
      },
      {
        path: 'netWorkDisconnection',
        name: 'netWorkDisconnectionPage',
        component: () => import('@/pages/default/netWorkDisconnection.vue'),
        meta: {
          title: '网络断开页',
          icon: HomeIcon
        }
      },
      {
        path: '404',
        name: '404Page',
        component: () => import('@/pages/default/404.vue'),
        meta: {
          title: '访问页面不存在',
          icon: DetailIcon
        }
      },
      {
        path: 'forbidden',
        name: 'forbiddenPage',
        component: () => import('@/pages/default/forbidden.vue'),
        meta: {
          title: '无权限',
          icon: DashboardIcon
        }
      }
    ]
  },

  {
    path: '/module',
    name: 'module',
    component: Layout,
    redirect: '/module/moduleList',
    meta: {
      title: '组件',
      icon: ModelIcon
    },
    children: [
      {
        path: 'moduleList',
        name: 'moduleList',
        component: () => import('@/pages/module/list.vue'),
        meta: {
          title: '列表',
          icon: FormIcon
        }
      },
      {
        path: 'popup',
        name: 'popup',
        component: () => import('@/pages/module/popup.vue'),
        meta: {
          title: '弹窗',
          icon: ListIcon
        }
      },
      {
        path: 'forbiddenTip',
        name: 'forbiddenTip',
        component: () => import('@/pages/module/forbiddenTip.vue'),
        meta: {
          title: '禁用提示',
          icon: GrzxIcon
        }
      },
      {
        path: 'addData',
        name: 'addData',
        component: () => import('@/pages/module/addData.vue'),
        meta: {
          title: '动态增加数据',
          icon: DetailIcon
        }
      },
      {
        path: 'transfer',
        name: 'transfer',
        component: () => import('@/pages/module/transfer.vue'),
        meta: {
          title: '穿梭框',
          icon: DashboardIcon
        }
      }
    ]
  }
]
